import { defineStore } from 'pinia'
import { getMenuApi, getUserInfoApi } from '@/api/api.js'

const useAdminStore = defineStore({
	id: 'admin',
	state: () => ({
		loading: false,
		loadingCount: 0,
		userInfo: {},
		menu: [],
	}),
	actions: {
		async setUserInfo() {
			return getUserInfoApi()
		},
		async setMenu() {
			return getMenuApi()
		},
	},
})

export default useAdminStore
